package org.gordonframework.core.tween.interpolate {

	/**
	 * @author sampet
	 */
	public class GNumberInterplator implements GInterpolator {

		private var _name:String;
		private var from:Number;
		private var delta:Number;

		public function GNumberInterplator(from:Number, to:Number, name:String) {
			_name = name;
			this.from = from;
			this.delta = to - from;
		}

		public function get name():String {
			return _name;
		}

		public function interpolate(target:Object, t:Number):void {
			target[name] = from + delta * t;
		}
	}
}
